DSH Plugin dsh-code-diff-viewer: Transform edit/write tool calls into a collapsible code comparison panel
dsh-code-diff-viewer is a third-party plugin developed specifically for the DeepSeek Harness (DSH) Web interface, designed to optimize the visualization experience of `edit` and `write` tool calls. It is not an official DSH component but rather injects into the conversation stream in a purely visual manner, rendering code changes as collapsible "before/after" comparison panels, without creating a new mode or saving files to disk. Its core functions include automatically selecting a two-column or single-column display format based on the type of change—mixed additions and deletions, pure additions, or pure deletions; displaying absolute line numbers inferred from the Host side to facilitate positioning; featuring a built-in lightweight tokenizer to support syntax highlighting for languages such as JavaScript/TypeScript and Python; and providing intelligent card collapsing, which automatically expands the latest changes while collapsing historical records. Installation requires having the DSH CLI installed and...
Read MoreGit Version Comparison: How to View Code Differences Between Different Versions
Git version comparison is a fundamental and commonly used operation, tracking code changes through diff tools to facilitate collaboration and management. Scenarios requiring version comparison include: locating development errors, checking the staging area before commits, understanding differences before merging branches, and confirming content before rolling back. Common commands and scenarios: 1. Differences between the working directory and the staging area: `git diff`; 2. Differences between the staging area and the most recent commit: `git diff --staged`; 3. Differences between two historical commits: `git diff <commit1> <commit2>` (supports relative commit names like `HEAD~n`); 4. Differences between two branches: `git diff branch1 branch2`; 5. Viewing the content of a single commit: `git show <commit-id>`. Graphical tools (such as VS Code, GitKraken) are suitable for beginners. Mastering commands for different scenarios enables efficient code version management.
Read More